Page({
  data: {
    houseDetail: {}
  },
  editHouse() {
    wx.navigateTo({
      url: '/house_pkg/pages/form/index?id=' + this.data.id,
    })
  },
  onLoad(params) {
    this.getHouseDetail(params.id)
  },
  async getHouseDetail(id) {
    const r = await wx.http.get(`/room/${id}`)
    if (r.code !== 10000) return wx.utils.toast()

    /* this.setData({
      houseDetail: r.data,
    }) */
    this.setData(r.data)
  }
})